<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>standard_matcher? (Spec::Translator)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File vendor\plugins\rspec/lib/spec/translator.rb, line 88</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">standard_matcher?</span>(<span class="ruby-identifier">matcher</span>)
      <span class="ruby-identifier">patterns</span> = [
        <span class="ruby-regexp re">/^be/</span>, 
        <span class="ruby-regexp re">/^be_close/</span>,
        <span class="ruby-regexp re">/^eql/</span>, 
        <span class="ruby-regexp re">/^equal/</span>, 
        <span class="ruby-regexp re">/^has/</span>, 
        <span class="ruby-regexp re">/^have/</span>, 
        <span class="ruby-regexp re">/^change/</span>, 
        <span class="ruby-regexp re">/^include/</span>,
        <span class="ruby-regexp re">/^match/</span>, 
        <span class="ruby-regexp re">/^raise_error/</span>, 
        <span class="ruby-regexp re">/^respond_to/</span>, 
        <span class="ruby-regexp re">/^redirect_to/</span>, 
        <span class="ruby-regexp re">/^satisfy/</span>, 
        <span class="ruby-regexp re">/^throw_symbol/</span>,
        <span class="ruby-comment cmt"># Extra ones that we use in spec_helper</span>
        <span class="ruby-regexp re">/^pass/</span>,
        <span class="ruby-regexp re">/^fail/</span>,
        <span class="ruby-regexp re">/^fail_with/</span>,
      ]
      <span class="ruby-identifier">matched</span> = <span class="ruby-identifier">patterns</span>.<span class="ruby-identifier">detect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">matcher</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">p</span> }
      <span class="ruby-operator">!</span><span class="ruby-identifier">matched</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>